Getting value depedning on two boolean attrinutes.[Nested ifs]

Posted by uswaretech on Stack Overflow See other posts from Stack Overflow or by uswaretech
Published on 2010-04-08T13:33:33Z Indexed on 2010/04/08 13:43 UTC
Read the original article Hit count: 213

Filed under:
|

I have two fields

start_time

end_time -> can be null

Now, depending on this I needs to differentiate between three states

Scheduled in future, Currently running Completed in past

Since mysql IF operator can not be nested, (Or I cant find an easy way to nest them), I cant find how to get the three state status.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-query